package com.gxa.controller.flow;


import com.gxa.common.R;
import com.gxa.common.vo.ConfirmedPatient;
import com.gxa.entity.*;
import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Controller
@RequestMapping("/patient")
@Api(value = "确诊病例管理",tags = "确诊病例管理接口API")
public class PatientController {

    /**
     * 1.查询所有确诊病例管理接口
     * @param currentPage
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/findAllPatient",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有确诊病例管理接口",notes = "查询所有病例进行分页显示",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "每页显示记录数",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ResponseBody
    public R findAllPatient(int currentPage,int pageSize){
        DistrictSysPatient districtSysPatient = new DistrictSysPatient();
        districtSysPatient.setPatientId(1);
        districtSysPatient.setName("张晓雅");
        districtSysPatient.setContactsNum("1232");
        districtSysPatient.setSex("女");
        districtSysPatient.setIdNum("320729188872318");
        districtSysPatient.setPhoneNum("17768089879");
        districtSysPatient.setResidenceAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setCaseType("普通病例");
        districtSysPatient.setRegistrant("系统");
        districtSysPatient.setRegistrationDate(new Date());
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(districtSysPatient);
        return r;
    }

    /**
     * 2.按条件查询病例接口
     * @param currentPage
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/findPatientbyID",method = RequestMethod.GET)
    @ApiOperation(value = "按条件查询病例接口",notes = "按条件查询病例",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "姓名",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "sex",value = "性别",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "birthday",value = "出生年月",required = false,dataType = "Date",paramType = "query"),
            @ApiImplicitParam(name = "idNum",value = "身份证号",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "phoneNum",value = "手机号",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "residenceAddress",value = "户籍地址",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "address",value = "现居地",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "registrant",value = "登记人",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "registrationDate",value = "登记日期",required = false,dataType = "Date",paramType = "query"),
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "每页显示记录数",required = true,dataType = "int",paramType = "query")
    })

    @ResponseBody
    public R findPatientbyID(int currentPage,int pageSize){
        DistrictSysPatient districtSysPatient = new DistrictSysPatient();
        districtSysPatient.setPatientId(1);
        districtSysPatient.setName("张晓雅");
        districtSysPatient.setContactsNum("1232");
        districtSysPatient.setSex("女");
        districtSysPatient.setIdNum("320729188872318");
        districtSysPatient.setPhoneNum("17768089879");
        districtSysPatient.setResidenceAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setCaseType("普通病例");
        districtSysPatient.setRegistrant("系统");
        districtSysPatient.setRegistrationDate(new Date());
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(districtSysPatient);
        return r;

    }

    /**
     * 3.删除病例接口
     * @param id
     * @return
     */
    @RequestMapping(value = "/deletePatient",method = RequestMethod.POST)
    @ApiOperation(value = "删除病例接口",notes = "根据患者编号删除病例信息",httpMethod = "POST",response = R.class)
    @ApiImplicitParam(name = "id",value = "要删除的患者编号",required = true,dataType = "int",paramType = "query")
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R deletePatient(int id){
        R r = new R();
        r.setCode(200);
        r.setMsg("删除成功！");
        return r;
    }


    /**
     * 4.新增病例接口   ************************************************************
     * @param name
     * @param sex
     * @param birthday
     * @param idNum
     * @param phoneNum
     * @param residenceAddress
     * @return
     */
    @RequestMapping(value = "/addPatient",method = RequestMethod.POST)
    @ApiOperation(value = "新增病例接口",notes = "新增病例信息",httpMethod = "POST",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "姓名",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "sex",value = "性别",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "birthday",value = "出生年月",required = false,dataType = "Date",paramType = "query"),
            @ApiImplicitParam(name = "idNum",value = "身份证号",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "phoneNum",value = "手机号",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "residenceAddress",value = "户籍地址",required = true,dataType = "String",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatient(String name,String sex,Date birthday,String idNum,String phoneNum,String residenceAddress){
        R r = new R();
        r.setCode(200);
        r.setMsg("新增成功！");
        // r.setData();
        return r;
    }


    /**
     * 5.编辑确诊患病例基本信息接口
     * @param districtSysPatient
     * @return
     */

    @RequestMapping(value = "/addPatientInformation",method = RequestMethod.POST)
    @ApiOperation(value = "编辑确诊患病例基本信息接口",notes = "编辑确诊患病例基本信息",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientInformation(@RequestBody @ApiParam(name = "districtSysPatient",value = "确诊患病例基本信息") DistrictSysPatient districtSysPatient){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功！");
        return r;
    }

    /**
     * 6.编辑确诊换病例发病就诊情况接口
     * @param patientTreatment
     * @return
     */
    @RequestMapping(value = "/addPatientTreatment",method = RequestMethod.POST)
    @ApiOperation(value = "编辑确诊换病例发病就诊情况接口",notes = "编辑确诊换病例发病就诊情况",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientTreatment(@RequestBody @ApiParam(name = "patientTreatment",value = "确诊换病例发病就诊情况") PatientTreatment patientTreatment){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功！");
        return r;
    }

    /**
     * 7.编辑确诊换病例危险因素与暴露史接口
     * @param patientRisk
     * @return
     */
    @RequestMapping(value = "/addPatientRisk",method = RequestMethod.POST)
    @ApiOperation(value = "编辑确诊换病例危险因素与暴露史接口",notes = "编辑确诊换病例危险因素与暴露史",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientRisk(@RequestBody @ApiParam(name = "patient_Risk",value = "确诊换病例危险因素与暴露史") PatientRisk patientRisk){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功！");
        return r;
    }

    /**
     * 8.编辑确诊换病例流行病学调查接口  *********************************************************
     * @param patientEpidemiology
     * @return
     */
    @RequestMapping(value = "/addPatientEpidemiology",method = RequestMethod.POST)
    @ApiOperation(value = "编辑确诊换病例流行病学调查接口",notes = "编辑确诊换病例流行病学调查",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientEpidemiology(@RequestBody @ApiParam(name = "patientEpidemiology",value = "确诊换病例流行病学调查") PatientEpidemiology patientEpidemiology){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功！");
        return r;
    }


    /**
     * 9.新增确诊换病例轨迹调查接口
     * @param
     * @return
     */
    @RequestMapping(value = "/addPatientTrack",method = RequestMethod.POST)
    @ApiOperation(value = "新增确诊换病例轨迹调查接口",notes = "新增确诊换病例轨迹调查",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientTrack(){
        R r = new R();
        r.setCode(200);
        r.setMsg("新增成功！");
        return r;
    }

    /**
     * 10.修改确诊换病例轨迹调查接口
     * @param
     * @return
     */
    @RequestMapping(value = "/updatePatientTrack",method = RequestMethod.POST)
    @ApiOperation(value = "修改确诊换病例轨迹调查接口",notes = "修改确诊换病例轨迹调查",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R updatePatientTrack(){
        R r = new R();
        r.setCode(200);
        r.setMsg("修改成功！");
        return r;
    }


    /**
     * 11.删除确诊换病例轨迹调查接口
     * @param
     * @return
     */
    @RequestMapping(value = "/deletePatientTrack",method = RequestMethod.POST)
    @ApiOperation(value = "删除确诊换病例轨迹调查接口",notes = "删除确诊换病例轨迹调查",httpMethod = "POST",response = R.class)
    @ApiImplicitParam(name = "id",value = "要删除的轨迹",required = true,dataType = "int",paramType = "query")
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R deletePatientTrack(){
        R r = new R();
        r.setCode(200);
        r.setMsg("删除成功！");
        return r;
    }


    /**
     * 12.按条件查询确诊换病例密切接触者接口
     * @param currentPage
     * @param pageSize
     * @return
     */


    @RequestMapping(value = "/findDistrictSysContact",method = RequestMethod.GET)
    @ApiOperation(value = "按条件查询确诊换病例密切接触者接口",notes = "按条件查询确诊换病例密切接触者",httpMethod = "get",response = R.class)
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "姓名",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "sex",value = "性别",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "idNum",value = "身份证号",required = true,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "phoneNum",value = "手机号",required = false,dataType = "String",paramType = "query"),
            @ApiImplicitParam(name = "currentPage",value = "当前页",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "页面显示条数",required = true,dataType = "int",paramType = "query"),

    })
    @ResponseBody
    public R findDistrictSysContact(int currentPage,int pageSize){
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        return r;

    }


    /**
     * 13.查询所有的密集人员接口
     * @param currentPage
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/findAllSysContact",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有的密集人员接口",notes = "查询所有密集人员",httpMethod = "get", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true,dataType = "int",paramType = "query")})
    @ResponseBody
    @ApiResponses({
            @ApiResponse(code=200,message="查询成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    public R findAllSysContact(int currentPage,int pageSize){
        DistrictSysContact districtSysContact = new DistrictSysContact();
        districtSysContact.setName("张晓雅");
        districtSysContact.setSex("男");
        districtSysContact.setIdNum("320729188872318");
        districtSysContact.setPhoneNum("177680898");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功");
        r.setData(districtSysContact);
        return r;
    }

    /**
     * 14.新增密接人员接口
     * @param districtSysContact
     * @return
     */
    @RequestMapping(value = "/addCrowded",method = RequestMethod.POST)
    @ApiOperation(value = "新增密接人员接口",notes = "增加密接人员",httpMethod = "post", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="添加成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addCrowded(@RequestBody @ApiParam(name = "districtSysContact",value = "密接/次密/一般人员信息",required = true) DistrictSysContact districtSysContact){
        R r = new R();
        r.setCode(200);
        r.setMsg("新增成功");
//        r.setData(districtSysContact);
        return r;
    }


    /**
     * 15.编辑密接人员接口
     * @param districtSysContact
     * @return
     */
    @RequestMapping(value = "/updateCrowded",method = RequestMethod.POST)
    @ApiOperation(value = "编辑密接人员接口",notes = "编辑密接人员",httpMethod = "post", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="添加成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R updateCrowded(@RequestBody @ApiParam(name = "districtSysContact",value = "密接/次密/一般人员信息",required = true) DistrictSysContact districtSysContact){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功");
        return r;
    }


    /**
     * 16.删除密接人员接口
     * @param
     * @return
     */
    @RequestMapping(value = "/deleteCrowded",method = RequestMethod.POST)
    @ApiOperation(value = "删除密接人员接口",notes = "删除密接人员",httpMethod = "post", response = R.class)
    @ApiImplicitParam(name = "id",value = "密接人员编号",required = true,dataType = "int",paramType = "query")
    @ApiResponses({
            @ApiResponse(code=200,message="添加成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R deleteCrowded(int id){
        R r = new R();
        r.setCode(200);
        r.setMsg("删除成功");
//        r.setData(districtSysContact);
        return r;
    }

    /**
     *17.查询确诊换病例采样及检测情况接口
     * @param currentPage
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/addPatientSample",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例采样及检测情况接口",notes = "查询确诊患病例采样及检测情况",httpMethod = "get", response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "pageSize",value = "页面大小",required = true,dataType = "int",paramType = "query"),
            @ApiImplicitParam(name = "id",value = "密接人员编号",required = true,dataType = "int",paramType = "query")
    })

    @ApiResponses({
            @ApiResponse(code=200,message="查询成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientSample(int currentPage,int pageSize,int id){

        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功");

        return r;
    }

    /**
     * 18.编辑确诊换病例感染来源分析接口
     * @param patientInfection
     * @return
     */
    @RequestMapping(value = "/addPatientInfection",method = RequestMethod.POST)
    @ApiOperation(value = "编辑确诊换病例感染来源分析接口",notes = "编辑确诊换病例感染来源分析",httpMethod = "post", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="添加成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R addPatientInfection(@RequestBody @ApiParam(name = "patient_Infection",value = "感染来源分析",required = true) PatientInfection patientInfection){
        R r = new R();
        r.setCode(200);
        r.setMsg("编辑成功");
//        r.setData(districtSysContact);
        return r;
    }

    /**
     *19.查询确诊患病例基本信息接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientInformation",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊患病例基本信息接口",notes = "查询确诊患病例基本信息",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientInformation(int patientId){
        DistrictSysPatient districtSysPatient = new DistrictSysPatient();
        districtSysPatient.setPatientId(1);
        districtSysPatient.setName("张晓雅");
        districtSysPatient.setContactsNum("1232");
        districtSysPatient.setSex("女");
        districtSysPatient.setIdNum("320729188872318");
        districtSysPatient.setPhoneNum("17768089879");
        districtSysPatient.setResidenceAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setAddress("江苏省/苏州市/姑苏区");
        districtSysPatient.setCaseType("普通病例");
        districtSysPatient.setRegistrant("系统");
        districtSysPatient.setRegistrationDate(new Date());
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(districtSysPatient);
        return r;
    }


    /**
     * 20.查询确诊患病例发病就诊情况接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientTreatment",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊患病例发病就诊情况接口",notes = "查询确诊患病例发病就诊情况",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientTreatment(int patientId){
        PatientTreatment patientTreatment = new PatientTreatment();
        patientTreatment.setBodyTemperature("36");
        patientTreatment.setAdmissionDate(new Date());
        patientTreatment.setCtDate(new Date());
        patientTreatment.setCtResult("良性");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(patientTreatment);
        return r;
    }


    /**
     * 21.查询确诊换病例危险因素与暴露史接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientRisk",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例危险因素与暴露史接口",notes = "查询确诊换病例危险因素与暴露史",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientRisk(int patientId){
        PatientRisk patientRisk = new PatientRisk();
        patientRisk.setSmoke("是");
        patientRisk.setSmokingFrequency("一天一包");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(patientRisk);
        return r;
    }


    /**
     * 22.查询确诊换病例流行病学调查接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientEpidemiology",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例流行病学调查接口",notes = "查询确诊换病例流行病学调查",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientEpidemiology(int patientId){
        PatientEpidemiology patientEpidemiology = new PatientEpidemiology();
        patientEpidemiology.setBacktrackingTime(new Date());
        patientEpidemiology.setLivingHistory("无");
        patientEpidemiology.setSymptom("高温");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(patientEpidemiology);
        return r;
    }

    /**
     * 23.查询确诊换病例轨迹调查接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientTrack",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例轨迹调查接口",notes = "查询确诊换病例轨迹调查",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientTrack(int patientId){

        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");

        return r;
    }

    /**
     * 24.查询确诊换病例感染来源分析接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findPatientInfection",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例感染来源分析接口",notes = "查询确诊换病例感染来源分析接口",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findPatientInfection(int patientId){
        PatientInfection patientInfection= new PatientInfection();
        patientInfection.setEpidemiological_Clues("无");
        patientInfection.setPreliminary_Conclusions("境外输入");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(patientInfection);
        return r;
    }


    /**
     * 25.查询确诊换病例数据日志接口
     * @param patientId
     * @return
     */
    @RequestMapping(value = "/findActionLog",method = RequestMethod.GET)
    @ApiOperation(value = "查询确诊换病例数据日志接口",notes = "查询确诊换病例数据日志接口",httpMethod = "get",response = R.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "patientId",value = "患者编号",required = true,dataType = "int",paramType = "query")
    })
    @ApiResponses({
            @ApiResponse(code = 200,message = "请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R findActionLog(int patientId){
        SysActionLog sysActionLog = new SysActionLog();
        sysActionLog.setOperationContent("张海迪 更新了确诊患者  张晓雅的信息");
        sysActionLog.setOperationTime(new Date());
        sysActionLog.setOperator("张海迪");
        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功！");
        r.setData(sysActionLog);
        return r;
    }

}
